package demo02FactoryPattern.factory01;

/**
 * @author: WangPeng
 * @createTime: 2022/11/08 10:06
 * @description:
 * @version: v1.0
 */
public class NoteBookFactory {
    public static NoteBook createNoteBook(String name){
        if (name.equals("神州")){
            return new ShenZhouNoteBook();
        }else if (name.equals("华为")){
            return new HuaWeiNoteBook();
        }else {
            System.out.println("没有您想要的品牌");
            return null;
        }
    }
}
